﻿#region Using Directives

using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using GeekRule.ORM.Entities;

#endregion

namespace GeekRule.ORM.Query
{
    /// <summary>
    /// Interface for vendor-specific QueryAdapter implementations
    /// </summary>
    interface IQueryAdapter
    {
        // Queries
        DataSet ExecuteDataSet(DbCommand command);
        IDataReader ExecuteReader(DbCommand command);
        List<T> ExecuteQuery<T>(DbCommand command) where T : EntityBase;
        object ExecuteScalar(DbCommand command);
        int ExecuteNonQuery(DbCommand command);
        void ExecuteMultiResultQuery(DbCommand command);
        List<T> GetResult<T>() where T : EntityBase;
            
        // Helpers
        DbCommand GetCommand(CommandType commandType, string commandText, params object[] values);
    }
}
